
public class getQuery {
	
	/**
	 * Returns array of queries for that location
	 * 0 - by relevance
	 * 1 - by date
	 * 2 - with query sport
	 * 3 - with query business
	 * 
	 * @param input
	 * @return
	 */
	
	private static int debug = 0;
	
	public static String[] getQuery(String input,String country)
	{
		String[] q = new String[5];
		
		String[] split = input.trim().split(" ");
		if(split.length > 1) 
			{
				input="";
				for(int i=0;i<(split.length -1);i++) input = input+ split[i] + "%2B";
				input = input+ split[split.length -1];
			}
		
		q[0] = "http://news.google.com/news?pz=1&ned=us&hl=en&geo="+input+"+"+country+"&cf=all&output=rss";
		q[1] = "http://news.google.com/news?pz=1&ned=us&hl=en&geo="+input+"+"+country+"&cf=all&scoring=n&output=rss";
		q[2] = "http://news.google.com/news?pz=1&ned=us&hl=en&geo="+input+"+"+country+"&cf=all&scoring=n&q=sport&output=rss";
		q[3] = "http://news.google.com/news?pz=1&ned=us&hl=en&geo="+input+"+"+country+"&cf=all&scoring=n&q=business&output=rss";
		q[4] = "http://news.google.com/news?pz=1&ned=us&hl=en&geo="+input+"+"+country+"&cf=all&scoring=n&q=entertainment&output=rss";
		
		if(debug==1) for(int i=0;i<q.length;i++) System.out.println(q[i]);
		
		return q;
	}
}
